// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_REP_REGISTER_ATTACHED
// * CreateDate    : 2011-12-28 22:34:31
// * Creater       : CodeSmith
// * LastChangeDate: 2011-12-28 22:34:31
// * LastChanger   : 2011-12-28 22:34:31
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class RepRegisterAttachedEntity : EntityBase
    {
        public RepRegisterAttachedTable TableSchema
        {
            get
            {
                return RepRegisterAttachedTable.Current;
            }
        }

        public RepRegisterAttachedEntity()
        {

        }

        public RepRegisterAttachedEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.AttachedId = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_ID"]));
            this.RegisterId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ID"]));
            this.RegisterItemId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ITEM_ID"]));
            this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
            this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
            this.UploadBy = Convert.ToString(CommonFunctions.ToObject(dr["UPLOAD_BY"]));
            this.UploadDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPLOAD_DATE"]));
        }

        public RepRegisterAttachedEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.AttachedId = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_ID"]));
            this.RegisterId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ID"]));
            this.RegisterItemId = Convert.ToString(CommonFunctions.ToObject(dr["REGISTER_ITEM_ID"]));
            this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
            this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
            this.UploadBy = Convert.ToString(CommonFunctions.ToObject(dr["UPLOAD_BY"]));
            this.UploadDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPLOAD_DATE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return RepRegisterAttachedTable.Current;
            }
        }

        #region Perporty List
        public string AttachedId
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_ATTACHED_ID)); }
            set { SetData(RepRegisterAttachedTable.C_ATTACHED_ID, value); }
        }

        public string RegisterId
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_REGISTER_ID)); }
            set { SetData(RepRegisterAttachedTable.C_REGISTER_ID, value); }
        }

        public string RegisterItemId
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_REGISTER_ITEM_ID)); }
            set { SetData(RepRegisterAttachedTable.C_REGISTER_ITEM_ID, value); }
        }

        public string FileName
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_FILE_NAME)); }
            set { SetData(RepRegisterAttachedTable.C_FILE_NAME, value); }
        }

        public string Description
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_DESCRIPTION)); }
            set { SetData(RepRegisterAttachedTable.C_DESCRIPTION, value); }
        }

        public string UploadBy
        {
            get { return Convert.ToString(GetData(RepRegisterAttachedTable.C_UPLOAD_BY)); }
            set { SetData(RepRegisterAttachedTable.C_UPLOAD_BY, value); }
        }

        public DateTime UploadDate
        {
            get { return Convert.ToDateTime(GetData(RepRegisterAttachedTable.C_UPLOAD_DATE)); }
            set { SetData(RepRegisterAttachedTable.C_UPLOAD_DATE, value); }
        }

        #endregion
    }


}

